package com.nbsaas.boot.data.rest.convert;

import com.nbsaas.boot.data.data.entity.QuerySnippet;
import com.nbsaas.boot.data.api.domain.request.QuerySnippetRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 请求对象转换成实体对象
*/

public class QuerySnippetEntityConvert  implements Converter<QuerySnippet, QuerySnippetRequest> {

    @Override
    public QuerySnippet convert(QuerySnippetRequest source) {
        QuerySnippet result = new QuerySnippet();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

